import 'package:flutter/material.dart';

class NotFoundPage extends StatelessWidget {
  const NotFoundPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white70,
      appBar: AppBar(
        surfaceTintColor: Colors.white,
        elevation: 6,
        shadowColor: Colors.black26,
        title: const Text("404"),
        centerTitle: true,
      ),
      body: Container(
        width: double.infinity,
        height: 60,
        padding: const EdgeInsets.only(left: 20, right: 20),
        margin: const EdgeInsets.only(top: 20, bottom: 20),
        decoration: const BoxDecoration(color: Colors.white),
        child: Column(
          children: [
            const Text('未找到页面'),
            Container(
              width: double.infinity,
              height: 70,
              padding: const EdgeInsets.only(top: 24),
              child: ElevatedButton(
                style: ButtonStyle(
                  shape: MaterialStateProperty.all(
                    const RoundedRectangleBorder(
                      borderRadius: BorderRadius.all(Radius.circular(8)),
                    ),
                  ),
                  foregroundColor: MaterialStateProperty.all(Colors.white),
                  backgroundColor: MaterialStateProperty.all(Colors.teal),
                ),
                onPressed: () {
                  Navigator.of(context).pop();
                },
                child: const Text(
                  '返回上一页',
                  style: TextStyle(fontSize: 18),
                ),
              ),
            )
          ],
        ),
      ),
    );
  }
}